import { httpRouter } from "convex/server";
import { authComponent, createAuth } from "./auth";

const http = httpRouter();

{{#if (or (includes frontend "tanstack-start") (includes frontend "next") (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
authComponent.registerRoutes(http, createAuth);
{{else}}
authComponent.registerRoutes(http, createAuth, { cors: true });
{{/if}}

export default http;